* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0;
    font-size: 1.2rem;
}

.quiz-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.phrase-display {
    margin-bottom: 1.5rem;
    text-align: center;
}

input[type="text"] {
    width: 100%;
    padding: 0.8rem;
    margin: 1rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    display: block;
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #0056b3;
}

#result {
    margin-top: 1rem;
    text-align: center;
    font-weight: bold;
}

.history-section {
    margin-top: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 100px;
}

.history-item {
    background: white;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.history-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.history-date {
    color: #666;
}

.history-score {
    font-weight: bold;
}

.toggle-details {
    padding: 0.3rem 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.toggle-details:hover {
    background: #0056b3;
}

.history-details {
    display: none;
    padding: 1rem;
}

.history-details.show {
    display: block;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.details-table th,
.details-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.details-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.details-table tr.correct {
    background: #f0fff0;
}

.details-table tr.incorrect {
    background: #fff0f0;
}

.result-icon {
    font-weight: bold;
}

.correct .result-icon {
    color: green;
}

.incorrect .result-icon {
    color: red;
}

.review-status {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    color: #666;
}

.welcome-guide {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.guide-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
}

.guide-content h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.guide-content pre {
    white-space: pre-wrap;
    font-family: inherit;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tutorial-tooltip {
    position: fixed;
    background: #007bff;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    z-index: 1001;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    width: max-content;
    max-width: 300px;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) translateX(-50%);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%);
    }
}

.tooltip-content {
    text-align: center;
}

.next-tip {
    margin-top: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: white;
    color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.next-tip:hover {
    background: #f8f9fa;
}

#startLearning {
    display: block;
    width: 200px;
    margin: 1rem auto;
    padding: 0.8rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#startLearning:hover {
    background: #0056b3;
}

.history-item:empty {
    padding: 1rem;
    text-align: center;
    color: #666;
}

#hint {
    min-height: 1.5em;
    color: #666;
    font-style: italic;
    margin: 0.5rem 0;
    transition: opacity 0.5s ease-in;
}

.new-quiz-btn {
    display: inline-block;
    width: auto;
    padding: 0.5rem 1.5rem;
    margin: 1rem 0;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.new-quiz-btn:hover {
    background: #218838;
}

button.disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

button.disabled:hover {
    background: #cccccc;
}

input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
} 